{extend name="base" /}
{block name="content"}
<script language="javascript" type="text/javascript" src="__STATIC__/public/My97DatePicker/WdatePicker.js"></script>
<div class="g-main">
    <div class="m-main-title">
        <div class="m-container-fluid">
            <a href="{:url('index/welcome')}"><i class="icon icon-home"></i>首页</a>
            <span class="icon-angle-right"></span>
            <span>商城</span>
            <span class="icon-angle-right"></span>
            <span>提现管理</span>
            <span class="icon-angle-right"></span>
            <span>查看信息</span>
            <a class="u-flush"><i class="icon-repeat"></i></a>
        </div>
    </div>
    <div class="m-main-content">
        <div class="m-container">
            <div class="m-form">
                <form class="layui-form" id="j_form">
                    <table class="m-table">
                        <thead>
                            <tr>
                                <th colspan="2">银行卡/微信号</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td width="15%"><label for="alias_name">微信号</label></td>
                                <td>{$data.member_cash['wecaht_number']}</td>
                            </tr>
                            <tr>
                                <td width="15%"><label for="alias_name">姓名</label></td>
                                <td>{$data.member_cash['name']}</td>
                            </tr>
                            <tr>
                                <td width="15%"><label for="alias_name">卡号</label></td>
                                <td>{$data.member_cash['card_no']}</td>
                            </tr>
                            <tr>
                                <td width="15%"><label for="alias_name">开户行</label></td>
                                <td>{$data.member_cash['bank']}</td>
                            </tr>
                        </tbody>
                    </table>
                    <table class="m-table">
                        <thead>
                        <tr>
                            <th colspan="2">基本信息</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td width="15%"><label for="alias_name">昵称</label></td>
                            <td>{$data.nickname}</td>
                        </tr>
                        <tr>
                            <td width="15%"><label for="alias_name">头像</label></td>
                            <td><img src="{$data.headimgurl}" alt="" style="display: block; width: 50px; height: 50px;" /></td>
                        </tr>
                        <tr>
                            <td width="15%"><label for="alias_name">店铺名称</label></td>
                            <td>{$data.business_name}</td>
                        </tr>
                        <tr>
                            <td width="15%"><label for="alias_name">提现金额</label></td>
                            <td>{$data.money}元</td>
                        </tr>
                        <tr>
                            <td width="15%"><label for="alias_name">提现方式</label></td>
                            <td>{$data.withdrawal_method}</td>
                        </tr>
                        <tr>
                            <td width="15%"><label for="alias_name">状态</label></td>
                            <td>{$data.status_txt}</td>
                        </tr>
                        <tr>
                            <td width="15%"><label for="alias_name">提现时间</label></td>
                            <td>{$data.created_at}</td>
                        </tr>
                        <tr>
                            <td width="15%"><label for="alias_name">操作</label></td>
                            <td>
                                {if condition="$data['status'] eq 0"}
                                <a data-id="{$data.id}" data-status="1" class="u-exam">审核通过</a>
                                <a data-id="{$data.id}" data-status="2" class="u-exam">审核不通过</a>
                                {/if}
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </form>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="extrajs"}

<script>
    layui.use(['layer'], function(){
        var layer = layui.layer;

        $('.u-exam').on('click', function(){
            var id     = $(this).attr('data-id');
            var status = $(this).attr('data-status');
            layer.confirm('您确定执行此操作吗？', {
                btn: ['确定','取消'] //按钮
            }, function(){
                $.post('{:url("examine")}', {id: id, status: status}, function(ret){
                    if (ret.status == 0) {
                        dialog.success(ret.message, function(){
                            window.location.reload();
                        })
                    }
                }, 'json');
            }, function(){

            });
        })
    })
</script>
{/block}